import dayjs from 'dayjs'

export function daysUntil(endTimeStr) {
  const now = dayjs()
  const end = dayjs(endTimeStr)
  const diff = end.diff(now, 'day', true) // true 表示返回小数
  console.log(diff, 'diff1111', now, end)
  return diff <= 0 ? 0 : Math.ceil(diff)
}